<template>
  <div>
      <el-row :gutter="20">
          <el-col :span="8">
              <el-form ref="form" label-width="80px">
                  <el-form-item label="名称">
                      {{storeInfo.name}}
                  </el-form-item>
                  <el-form-item label="Logo">
                      <el-image
                          style="width: 100px; height: 100px"
                          :src="storeInfo.logo"
                          :preview-src-list="[storeInfo.logo]"
                          fit="fill"></el-image>
                  </el-form-item>
                  <el-form-item label="法人">
                      {{storeInfo.legal_person}}
                  </el-form-item>
                  <el-form-item label="营业执照">
                      <el-image
                          style="width: 100px; height: 100px"
                          :src="storeInfo.license"
                          :preview-src-list="[storeInfo.license]"
                          fit="fill"></el-image>
                  </el-form-item>
                  <el-form-item>
                      <el-button type="primary" size="mini">{{$t('save')}}</el-button>
                  </el-form-item>
              </el-form>
          </el-col>
          <el-col :span="8">
              <el-divider content-position="left">财务信息</el-divider>
              <el-row>
                  <el-col :span="12">
                      <el-card shadow="always">
                          <span style="color: green;">余额: 5000</span>
                          <div class="bottom clearfix">
                              <el-button type="text" class="button">{{$t('withdraw')}}</el-button>
                              <el-button type="text" class="button">{{$t('bills')}}</el-button>
                          </div>
                      </el-card>
                  </el-col>
              </el-row>
              <el-divider content-position="left">订单信息</el-divider>
              <el-row :gutter="10">
                  <el-col :span="12" class="order-info">
                      <el-card shadow="always">
                          <span>待支付: <span class="order-num">1</span></span>
                      </el-card>
                  </el-col>
                  <el-col :span="12" class="order-info">
                      <el-card shadow="always">
                          <span>待发货: <span class="order-num">1</span></span>
                      </el-card>
                  </el-col>
                  <el-col :span="12" class="order-info">
                      <el-card shadow="always">
                          <span>待退款: <span class="order-num">1</span></span>
                      </el-card>
                  </el-col>
                  <el-col :span="12" class="order-info">
                      <el-card shadow="always">
                          <span>已完成: <span class="order-num">1</span></span>
                      </el-card>
                  </el-col>
              </el-row>
          </el-col>
      </el-row>
  </div>
</template>

<script>
import {info} from '../../../api/stores'
import {tableDefaultData} from '../../../libs/tableDataHandle'
import {queryParams} from "../../../mixins/queryParams"


export default {
    name: 'storeInfo',
    mixins:[queryParams],
    data() {
      return {
        ...tableDefaultData(),
       storeInfo:'',
      }
    },
    methods: {
        requestData() {
            let store_token = localStorage.getItem('store_token')
            info({store_token}).then(response => {
                this.storeInfo = response.data.data.data
            })
        }
    },
    computed: {
    },
      created() {
        this.requestData()
      }
  }
</script>

<style>
.time {
    font-size: 13px;
    color: #999;
}

.bottom {
    margin-top: 13px;
    line-height: 12px;
}

.button {
    padding: 0;
    float: right;
}

.image {
    width: 100%;
    display: block;
}

.clearfix:before,
.clearfix:after {
    display: table;
    content: "";
}

.clearfix:after {
    clear: both
}

.order-info {
    margin-bottom: 10px;
}
.order-num {
    color: #409EFF;
    cursor: pointer;
}
</style>
